﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace KINLO.UI.Main.Converter
{
    public class StateConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            try
            {
                int state = int.Parse(value.ToString());
                switch (state)
                {
                    case 1:
                        return "前扫码完成";
                    case 2:
                        return "前称重完成";
                    case 3:
                        return "后扫码完成";
                    case 4:
                        return "后称重完成";
                    case 5:
                        return "补液称重完成";
                    default:
                        return "";

                }

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                return "";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}
